<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- 插槽 是在父子组件前提下的内容 -->
        <!-- 插槽就像是容器 用来盛放父组件给的html的结构 -->
        <!-- 匿名插槽：来者不拒 -->
        <!-- 具名插槽：各回各家，各找各妈 -->
        <!-- 作用域插槽 -->
        <son>
            <h1 slot="147">早饭：包子</h1>
            <button slot="aaa">lalala</button>
        </son>
        <son>
            <p>午饭：烤包子</p>
            <input type="radio">
            <!-- slot="147" -->
            <template #147>
                <table border="1">
                    <tr>
                        <td>饿了吗</td>
                    </tr>
                    <tr>
                        <td>美团</td>
                    </tr>
                </table>
            </template>
        </son>
        <son>
            <i slot="147">晚饭：6宝子</i>
        </son>
    </div>
    <script>
        let vm = new Vue({
            el: '#app',
            data: {

            },
            methods: {

            },
            components: {
                'son': {
                    template: `<div><slot name="147"></slot><slot name="aaa"></slot></div>`,
                    props: ['info', 'type']
                }
            }
        })
    </script>
</body>

</html>